package com.yuexunit.operationman.nbsy.module.OperationInventory.adapter;

import android.widget.AbsListView;
import android.widget.TextView;

import com.yuexunit.operationman.nbsy.R;
import com.yuexunit.operationman.nbsy.module.OperationInventory.bean.InventoryBean;

import org.kymjs.kjframe.widget.AdapterHolder;
import org.kymjs.kjframe.widget.KJAdapter;

import java.util.Collection;

/**
 * Created by chenss on 2017/8/16 0016.
 */

public class PreviewInventoryAdapter extends KJAdapter<InventoryBean.ObjectEntity.CheckItemListEntity> {

    public PreviewInventoryAdapter(AbsListView view, Collection<InventoryBean.ObjectEntity.CheckItemListEntity> mDatas, int itemLayoutId) {
        super(view, mDatas, itemLayoutId);
    }

    @Override
    public void convert(AdapterHolder helper, final InventoryBean.ObjectEntity.CheckItemListEntity item, boolean isScrolling, final int position) {
        helper.setText(R.id.name,item.getItemName());
        final TextView num_01, num_02, num_04, num_05, num_06;
        num_01 = helper.getView(R.id.num_01);
        num_02 = helper.getView(R.id.num_02);
        num_04 = helper.getView(R.id.num_04);
        num_05 = helper.getView(R.id.num_05);
        num_06 = helper.getView(R.id.num_06);

        num_01.setText(item.getBeforeCheck() + "");
        num_02.setText(item.getInAdd() + "");
        num_04.setText(item.getBeforeCloseBody() + "");
        num_05.setText(item.getAfterCloseBody() + "");
        num_06.setText(item.getAfterSkin()+ "");

    }
}
